<template>
  <div class="movieMsg">
    <div class="title">
      <p>网页飞走了~~</p>
    </div>
    <div class="content404 clearfix">
      <img src="../../static/img/timg.jpg">
      <div class="butten-wrap">
        <a href="javascript:;" @click="goHome">返回首页</a>
        <a href="javascript:;" @click="goBack">返回上一页</a>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data () {
      return {}
    },
    mounted: function () {
      this.setHeight()
      const _this = this
      window.onresize = function () {
        _this.setHeight()
      }
    },
    methods: {
      goBack: function () {
        window.history.go(-1)
      },
      goHome: function () {
        this.$router.push({
          path: '/home'
        })
      },
      setHeight: function () {
        let height = window.screen.height * 2 - 80
        let content = document.getElementsByClassName('content404')[0]
        content.style.height = height + 'px'
      }
    }
  }
</script>
